package string;

import java.util.Arrays;

public class SplitDemo2 {
    public static void main(String[] args) {
        String str = "abc=def=ghi========";
        String[] arr = str.split("=", 2);
        System.out.println(Arrays.toString(arr));

        arr = str.split("=", 20);
        System.out.println(Arrays.toString(arr));

        arr = str.split("=", 0);//相当于arr = str.split("=");
        System.out.println(Arrays.toString(arr));

        arr = str.split("=", -1);//能拆尽拆
        System.out.println(Arrays.toString(arr));
    }
}
